package com.xmj.ms.service.impl;

import com.xmj.ms.domain.ServiceTypes;
import com.xmj.ms.mapper.ServiceTypesMapper;
import com.xmj.ms.service.IServiceTypesService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 服务Service业务层处理
 *
 * @author ohh
 * @date 2024-04-21
 */
@Service
public class ServiceTypesServiceImpl implements IServiceTypesService
{
    @Autowired
    private ServiceTypesMapper serviceTypesMapper;

    /**
     * 查询服务
     *
     * @param servicetypeID 服务主键
     * @return 服务
     */
    @Override
    public ServiceTypes selectServiceTypesByServicetypeID(Long servicetypeID)
    {
        return serviceTypesMapper.selectServiceTypesByServicetypeID(servicetypeID);
    }

    /**
     * 查询服务列表
     *
     * @param serviceTypes 服务
     * @return 服务
     */
    @Override
    public List<ServiceTypes> selectServiceTypesList(ServiceTypes serviceTypes)
    {
        return serviceTypesMapper.selectServiceTypesList(serviceTypes);
    }

    /**
     * 新增服务
     *
     * @param serviceTypes 服务
     * @return 结果
     */
    @Override
    public int insertServiceTypes(ServiceTypes serviceTypes)
    {
        return serviceTypesMapper.insertServiceTypes(serviceTypes);
    }

    /**
     * 修改服务
     *
     * @param serviceTypes 服务
     * @return 结果
     */
    @Override
    public int updateServiceTypes(ServiceTypes serviceTypes)
    {
        return serviceTypesMapper.updateServiceTypes(serviceTypes);
    }

    /**
     * 批量删除服务
     *
     * @param servicetypeIDs 需要删除的服务主键
     * @return 结果
     */
    @Override
    public int deleteServiceTypesByServicetypeIDs(Long[] servicetypeIDs)
    {
        return serviceTypesMapper.deleteServiceTypesByServicetypeIDs(servicetypeIDs);
    }

    /**
     * 删除服务信息
     *
     * @param servicetypeID 服务主键
     * @return 结果
     */
    @Override
    public int deleteServiceTypesByServicetypeID(Long servicetypeID)
    {
        return serviceTypesMapper.deleteServiceTypesByServicetypeID(servicetypeID);
    }
}
